package debugx

func RecoverError(handler func(err error)) {
	if ierr := recover(); ierr != nil {
		err, ok := ierr.(error)
		if ok {
			handler(err)
		}
	}
}
